<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title>八字影响宝宝一生</title>
    <!--[if lt IE 9]>  
        <script src="http://cdn.bootcss.com/html5shiv/r29/html5.js"></script>
        <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>    
    <![endif]-->
    <link rel="stylesheet" href="__PUBLIC__/css/ZM_share.css" />
    <link rel="stylesheet" href="__PUBLIC__/css/DateSelector.css">
    <script src="__PUBLIC__/js/DateSelector.js"></script>
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/rem.js"></script>
    <script src="__PUBLIC__/js/layer/layer.js"></script>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <style>
        body{background-color:#F6F0EA;}
        .main_title{
            width:100%;
            margin:0.2rem 0;
            padding:0 0.1rem;
            box-sizing: border-box;
            -webkit-box-sizing:border-box;
            -moz-box-sizing: border-box;
            -ms-box-sizing: border-box;
            -o-box-sizing:border-box; 
        }
        .main_title img{vertical-align: middle;}
        main{padding-top:0.46rem;}
        .form_container{
            margin:0 0.2rem;
            padding-top:0.36rem;
            border:1px solid #FB3B2B;
            position: relative;
            background-color:#FFF2DB;
        }
        .pfc_title{
            width:4.76rem;
            height:0.73rem;
            background:url('__PUBLIC__/images/pfc_img/title.png') no-repeat;
            background-size:100% 100%;
            position: absolute;
            top:-0.36rem;
            left:50%;
            margin-left:-2.38rem;
        }
        .pfc_prompt{font-size:0.18rem;color:#d84852;text-align: center;width:60%;margin:0.1rem auto;}

        .zm_form .zm_form_wrap ul{border:none;border-radius: 5px;background-color:transparent;}
        .zm_form .zm_form_wrap ul li{padding:5px;border: solid 1px #F2D097;margin-bottom:10px;background-color:#FFFFFF;font-size:0.32rem;}
        .zm_form .zm_form_wrap ul li:nth-last-child(1){margin-bottom:0;}
        .zm_form .zm_form_wrap ul li .form_auto span i{border-color:#9B9B9B;}
        .zm_form .zm_form_wrap ul li .form_left{color: #9B9B9B;}
        .zm_form .zm_form_wrap .form_auto span{width: inherit;margin-right:15px;}
        .zm_form .zm_form_wrap .form_auto span:nth-last-child(2){margin-right:0;}

        .xmcs_list{margin-bottom:15px;padding:0 0.2rem;}
        .xmcs_list:first-child{padding-top:0.3rem;}
        .xmcs_list img{vertical-align: middle;}
        .hot_cs{background-color:#FAEFEB;}

        .optmeal_container{padding:0.4rem 0.2rem 0;}
        .optmeal_title{
            text-align: center;
            font-size:0.36rem;
            color:#333333;
            font-weight: 600;
        }
        .optmeal_title::before,.optmeal_title::after{
            content:'';
            width:10%;
            height:0.04rem;
            background-color:#333333;
            display: inline-block;
            vertical-align: middle;
        }
        .optmeal_title::before{margin-right:0.1rem;}
        .optmeal_title::after{margin-left:0.1rem;}
        .optmeal_ul{padding:0.3rem 0 0.3rem;}
        .opt{
            padding:0.3rem 0.3rem 0.3rem 0.2rem;
            box-sizing: border-box;
            background-color:#ffffff;
            border-radius: 5px;
            position: relative;
            margin-bottom:0.2rem;
            border:4px solid transparent;
        }
        .opt:nth-last-child(1){margin-bottom:0;}
        .opt_left{width:80%;}
        .opt_left h4{font-size:0.26rem;font-family:Helvetica;margin-bottom:0.2rem;}
        .opt_left p{font-size: 0.2rem;color:rgba(102,102,102,0.8);line-height: 0.36rem;}
        .opt_right{
            width:0.3rem;
            height:0.3rem;
            border:2px solid #989898;
            border-radius: 50%;
            position: absolute;
            line-height: 0.3rem;
            text-align: center;
            top:50%;
            transform: translateY(-50%);
            -webkit-transform: translateY(-50%);
            right:0.3rem;
        }
        .opt_active{border:4px solid #db4852;}
        .opt_active .opt_right{border-color:#ed4852;}
        .opt_active .opt_right::before{
            content:'';
            width:0.25rem;
            height:0.25rem;
            border-radius: 50%;
            background-color:#ed4852;
            display: inline-block;
        }
        .opt_active .opt_left h4{color:#db4852;}
        .pfc_btn{
            width:3.78rem;
            height:0.98rem;
            background:url('__PUBLIC__/images/pfc_img/button.png') no-repeat;
            background-size:100% 100%;
            -webkit-tap-highlight-color: transparent;
            margin:0 auto;
        }
        .pfc_pro{padding:0.14rem 0 0.3rem;font-size:0.18rem;color:#333333;text-align: center;}

        .zm_form .zm_form_wrap .form_auto .Js_date{display: inline-block;background:none;color:#eb4852;}
        
    </style>
</head>
<body>
    <include file="Public/header"/>
    <div class="zm_banner">
        <img src="__PUBLIC__/images/pfc_img/banner.png" width="100%" />
    </div>
    <div class="main_title"><img src="__PUBLIC__/images/pfc_img/profile.png" alt="" width="100%"></div>
    <main id="scrollT">
        <section  class="form_container">
            <div class="pfc_title"></div>
            <p class="pfc_prompt">承诺10年以上经验大师真人择吉，非电脑程序出结果，误人前途，如非真实大师测算分文不收！</p>
            <form id="_form" class="zm_form" action="<!--{:U('Pfc/pfc_zhifu','',false)}-->" method="post">
                <div class="zm_form_wrap">
                    <ul>
                        <li>
                            <div class="form_left">宝宝性别</div>
                            <div class="form_auto">
                                <span class="on sex_btn" data-value="1">
                                    <i></i>
                                    <font>男</font>
                                </span>
                                <span class="sex_btn" data-value="0">
                                    <i></i>
                                    <font>女</font>
                                </span>
                                <span class="sex_btn" data-value="2">
                                    <i></i>
                                    <font>不确定</font>
                                </span>
                                <input type="hidden" id="sex" name="gender" value="1"/>
                            </div>
                        </li>
                        <li>
                            <div class="form_left">预产日期段</div>
                            <div class="form_auto">
                                <div type="text" class="Js_date" id="datetime">开始日期</div>
                                至
                                <div type="text" class="Js_date" id="datetime2">结束日期</div>
                                <input type="hidden" id="birthday" name="birthday"  value="" >
                                <input type="hidden" id="birthdayEnd" name="birthdayEnd"  value="" >
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="optmeal_container">
                    <div class="optmeal_title">套餐选择</div>
                    <ul class="optmeal_ul">
                        <li class="opt opt_active" data-value="0">
                            <div class="opt_left">
                                <h4>高级套餐(八字)</h4>
                                <p>八字断法为孩子推荐最佳的五个命格八字时间点</p>
                            </div>
                            <div class="opt_right"></div>
                        </li>
                        <li class="opt" data-value="1">
                            <div class="opt_left">
                                <h4>顶级套餐(八字+紫薇斗数双验证)</h4>
                                <p>5个好命格时间点，以八字和紫薇斗数两种算命法验证最吉，确保无错，并告知避免凶时2个</p>
                            </div>
                            <div class="opt_right"></div>
                        </li>
                         <!--<li class="opt" data-value="2">-->
                            <!--<div class="opt_left">-->
                                <!--<h4>至尊套餐(八字紫薇双验证,并标注凶时)</h4>-->
                                <!--<p>10个好命格时间点，八字秘法+紫薇斗数双古法验证吉时，并告知避免凶时5个</p>-->
                            <!--</div>-->
                            <!--<div class="opt_right"></div>-->
                        <!--</li>-->
                    </ul>
                </div>
                <input type="hidden" name="mealopt" id="mealopt" value="0">
            </form>
            <div class="cs_btn pfc_btn"></div>
            
            <p class="pfc_pro">由于大师真实人工测算，订单较多，结果需要1个工作日时间</p>
        </section>
        <section>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/xuanhaoming.png" alt="" width="100%" ></div>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/youshi.png" alt="" width="100%" ></div>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/piyu.png" alt="" width="100%" ></div>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/cesuan.png" alt="" width="100%" ></div>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/photos.png" alt="" width="100%" ></div>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/case.png" alt="" width="100%" ></div>
            <div class="xmcs_list"><img src="__PUBLIC__/images/pfc_img/liucheng.png" alt="" width="100%" ></div>
        </section>
    </main>
    <!-- 提示收藏 -->
    
    <!-- 热门测算 -->
    <div class="hot_cs">
        <include file="Public/zhiming" />
    </div>
    <!-- 脚 -->
    <footer class="footer_severs">
        <include file="Public/bottom-index" />
    </footer>
    <div class="fiex_bt" id="fiex">
        <a href="javascript:;">立即测算</a>
    </div>
    <!-- 时间 -->
    <div id="targetContainer"></div>
    <div id="targetContainer2"></div>
    <script>
        //测算底部悬浮
        $(function(){
            var topShow=$(".cs_btn");
            if(topShow.length){
                var topShow=topShow.offset().top;
                var testBtn=$("#fiex");
                $(window).scroll(function(){
                    var wt=$(window).scrollTop();
                    wt>topShow?(testBtn.fadeIn(),$('.footer_severs').css('padding-bottom','1.2rem')):(testBtn.fadeOut(),$('.footer_severs').css('padding-bottom','0.4rem'));
                });
                // goTop
                $('#fiex').on('click',function(){$('html,body').animate({scrollTop:$('#scrollT')[0].offsetTop},500)});
            }
        });
        // 选择按钮
        var sex_btn = document.querySelectorAll('.sex_btn');
        sex_btn.forEach(function(item,index,arr){
            item.onclick = function(){
                arr.forEach(function(item){item.classList.remove('on')})
                this.classList.add('on');
                document.querySelector('#sex').value = this.getAttribute('data-value');
            }
        })
        $('.opt').on('click',function(){
            $('.opt').removeClass('opt_active');
            $(this).addClass('opt_active');
            $('#mealopt').val($(this).attr('data-value'))
        })

        $(".pfc_btn").on('click',function(){
            if($("[name='birthday']").val() == ""){
                layer.msg("请选择预产开始日期");
                return false;
            }
            if($("[name='birthdayEnd']").val() == ""){
                layer.msg("请选择预产结束日期");
                return false;
            }
            var oli = layer.load();
            setTimeout(function(){
                layer.closeAll('loading');
                layer.msg('订单提交成功', {icon: 1});
                setTimeout(function(){
                    document.getElementById('_form').submit();
                },1300);
            },1000);
        });
        
        // 时间加0
        function getTime(timearr){
            var newTime = [];
            timearr.forEach(function(item){item < 10?item = '0'+item:item;newTime.push(item)});
            return newTime
        }
        var todayTime = [new Date().getFullYear(),new Date().getMonth()+1,new Date().getDate()];
        var startTime = startTime||todayTime;
        var EndTime = null;

             // 开始
            var time =new DateSelector({
                input: 'datetime',//点击触发插件的input框的id
                container: 'targetContainer',//插件插入的容器id
                type: 0,
                //0：不需要tab切换，自定义滑动内容，建议小于三个；
                //1：需要tab切换，【年月日】【时分】完全展示，固定死，可设置开始年份和结束年份
                param: [1, 1, 1, 0, 0,],
                //设置['year','month','day','hour','minute'],1为需要，0为不需要,需要连续的1
                beginTime: todayTime,//如空数组默认设置成1970年1月1日0时0分开始，如需要设置开始时间点，数组的值对应param参数的对应值。
                endTime: [2028,1,1],//如空数组默认设置成次年12月31日23时59分结束，如需要设置结束时间点，数组的值对应param参数的对应值。
                recentTime: todayTime,//如不需要设置当前时间，被为空数组，如需要设置的开始的时间点，数组的值对应param参数的对应值。
                success: function (dateArr) {
                    if(EndTime == null){
                        startTime = dateArr;
                        document.querySelector('#datetime').innerHTML = getTime(dateArr).join('-');
                        document.querySelector('#birthday').value = getTime(dateArr).join('-');
                        $('#datetime2').css('display','inline-block')
                    }else{
                        if(EndTime.join('') >= dateArr.join('')){
                            startTime = dateArr;
                            document.querySelector('#datetime').innerHTML = getTime(dateArr).join('-');
                            document.querySelector('#birthday').value = getTime(dateArr).join('-');
                            $('#datetime2').css('display','inline-block')
                        }else{
                            layer.msg("开始时间不能高于结束时间");
                        }
                    }
                }//回调
            });
            
            // 结束
            var time2 = new DateSelector({
                input: 'datetime2',//点击触发插件的input框的id
                container: 'targetContainer2',//插件插入的容器id
                type: 0,
                //0：不需要tab切换，自定义滑动内容，建议小于三个；
                //1：需要tab切换，【年月日】【时分】完全展示，固定死，可设置开始年份和结束年份
                param: [1, 1, 1, 0, 0,],
                //设置['year','month','day','hour','minute'],1为需要，0为不需要,需要连续的1
                beginTime:todayTime,//如空数组默认设置成1970年1月1日0时0分开始，如需要设置开始时间点，数组的值对应param参数的对应值。
                endTime: [2028,1,1],//如空数组默认设置成次年12月31日23时59分结束，如需要设置结束时间点，数组的值对应param参数的对应值。
                recentTime: [],//如不需要设置当前时间，被为空数组，如需要设置的开始的时间点，数组的值对应param参数的对应值。
                success: function (dateArr) {
                    if(startTime.join('') <= dateArr.join('')){
                        EndTime = dateArr;
                        document.querySelector('#datetime2').innerHTML = getTime(dateArr).join('-');
                        document.querySelector('#birthdayEnd').value =  getTime(dateArr).join('-');
                    }else{
                        layer.msg("结束时间不能低于开始时间");
                    }
                }//回调
            });
    </script>
</body>
</html>